package playn.game.menu.states;

import playn.core.GroupLayer;
import playn.game.core.Button;
import playn.game.core.Game;
import playn.game.core.State;
import playn.game.menu.Menu;

public class Start extends State {
	
	public Start(GroupLayer layer) {
		super(layer);
		name="START";
		map=Game.maps.get("Start.tmx");
	}

	@Override
	public void start(){
		super.start();
		transition.addIn(Game.background.layer);
	}

	@Override
	public void onPress(Button button){
		if(button.id().contentEquals("Skip")){
			
			transition.addIn(Menu.LEVELS.groupLayer);
			Game.menu.switchTo(Menu.LEVELS);
		}
		super.onPress(button);
	}

}
